package com.qf.feign;

import com.qf.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//指定被调用方调微服务的服务名

@FeignClient(name = "QF-SEARCH",fallback = SearchFeignFallback.class)
@RestController
@RequestMapping("/search")
public interface SearchFeigh {
    @RequestMapping("/test")
    public String test1();
    @RequestMapping("/query/{id}")
    public User findUserById(@PathVariable("id") Integer id);

}
